<template>
  <div>
    <ul>
      <li v-for="(item,index) in data" :key='index'>
        <!-- <router-link :to="`/home/message/detail?id=${item.id}&title=${item.title}`">message{{item.id}}</router-link> -->
        <router-link :to="{
          path: '/home/message/detail',
          query: {
            id: item.id,
            title: item.title
          }
        }">message{{item.id}}</router-link>
      </li>
    </ul>
    <hr>
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  name:'Message',
  data() {
    return {
      data:[
        {id:'001',title:'消息1'},
        {id:'002',title:'消息2'},
        {id:'003',title:'消息3'},
      ]
    }
  },
  
}
</script>

<style>

</style>